WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::NodeBase Class Referenceabstract

Base class for Nodes. More...

#include <core/common/node_base.h>

Inheritance diagram for wolf::NodeBase:
[legend]

Public Member Functions

 NodeBase (const std::string &_category, const std::string &_type="Undefined", const std::string &_name="")
 Constructor. More...
 
virtual ~NodeBase ()=default
 Destructor. More...
 
unsigned int nodeId () const
 Returns the node id, unique over the whole Wolf tree. More...
 
std::string getCategory () const
 Returns the category of the node. More...
 
std::string getType () const
 Returns the type (subcategory) of the node. More...
 
std::string getName () const
 Returns the name of the node. More...
 
bool isRemoving () const
 Returns whether the node is being removed. More...
 
virtual bool hasChildren () const =0
 Returns whether the node has children in the Wolf tree. More...
 
void setType (const std::string &_type)
 Sets the type (subcategory) of the node. More...
 
void setName (const std::string &_name)
 Sets the name of the node. More...
 
ProblemConstPtr getProblem () const
 Returns the problem the node belongs to. More...
 
ProblemPtr getProblem ()
 Returns the problem the node belongs to. More...
 

Protected Member Functions

virtual void setProblem (ProblemPtr _prob_ptr)
 Sets the problem the node belongs to. More...
 

Protected Attributes

ProblemWPtr problem_ptr_
 Problem the node belongs to. More...
 
unsigned int node_id_
 Node id. It is unique over the whole Wolf Tree. More...
 
std::string node_category_
 Text label identifying the category of node ("SENSOR", "FEATURE", etc) More...
 
std::string node_type_
 Type or subcategory of node (derived class name: "SensorOdom2d", etc) More...
 
std::string node_name_
 
bool is_removing_
 A flag for safely removing nodes from the Wolf tree. See remove(). More...
 

Detailed Description

Base class for Nodes.

Base class for all Nodes in the Wolf tree. Each node has

  • A unique ID. The class implements the ID factory.
  • A unique category name, strictly within this range of possibilities:
    • "HARDWARE"
    • "SENSOR"
    • "PROCESSOR"
    • "TRAJECTORY"
    • "FRAME"
    • "CAPTURE"
    • "FEATURE"
    • "FACTOR"
    • "MAP"
    • "LANDMARK"
    • "TREE_MANAGER"
  • A unique type, which is a subcategory of the above. The list here cannot be exhaustive, but a few examples follow:

    • "SensorCamera"
    • "SensorLaser2d"
    • "Landmark3d"
    • "ProcessorLaser2d"

    please refer to each base class derived from NodeBase for better examples of their types.

  • A name, defined in each application, which is specific of each object. Again, just some examples:

    • "Front-left camera"
    • "Main wheel odometer"
    • "IMU delta pre-integrator processor"

    These names are only required for objects being defined by the user at configuration time, such as:

    • Sensors
    • Processors

    Additionally, but not necessarily, one could also give names to:

    • Pre-defined maps or landmarks (provided to the problem)
    • Each of the generated captures --> these names could, for example, be a copy of the sensor name.

    Finally, all the other node names in the Wolf Tree are not required, and in fact they are not used for anything.

Constructor & Destructor Documentation

◆ NodeBase()

wolf::NodeBase::NodeBase ( const std::string &  _category,
const std::string &  _type = "Undefined",
const std::string &  _name = "" 
)
inline

Constructor.

Parameters
_categorycategory of the node ("SENSOR", "FRAME", etc.)
_typetype (subcategory) of the node
_namename of the node

◆ ~NodeBase()

virtual wolf::NodeBase::~NodeBase ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getCategory()

std::string wolf::NodeBase::getCategory ( ) const
inline

Returns the category of the node.

◆ getName()

std::string wolf::NodeBase::getName ( ) const
inline

Returns the name of the node.

◆ getProblem() [1/2]

ProblemPtr wolf::NodeBase::getProblem ( )
inline

Returns the problem the node belongs to.

◆ getProblem() [2/2]

ProblemConstPtr wolf::NodeBase::getProblem ( ) const
inline

Returns the problem the node belongs to.

◆ getType()

std::string wolf::NodeBase::getType ( ) const
inline

Returns the type (subcategory) of the node.

◆ hasChildren()

virtual bool wolf::NodeBase::hasChildren ( ) const
pure virtual

◆ isRemoving()

bool wolf::NodeBase::isRemoving ( ) const
inline

Returns whether the node is being removed.

◆ nodeId()

unsigned int wolf::NodeBase::nodeId ( ) const
inline

Returns the node id, unique over the whole Wolf tree.

◆ setName()

void wolf::NodeBase::setName ( const std::string &  _name)
inline

Sets the name of the node.

◆ setProblem()

void wolf::NodeBase::setProblem ( ProblemPtr  _prob_ptr)
inlineprotectedvirtual

◆ setType()

void wolf::NodeBase::setType ( const std::string &  _type)
inline

Sets the type (subcategory) of the node.

Member Data Documentation

◆ is_removing_

bool wolf::NodeBase::is_removing_
protected

A flag for safely removing nodes from the Wolf tree. See remove().

◆ node_category_

std::string wolf::NodeBase::node_category_
protected

Text label identifying the category of node ("SENSOR", "FEATURE", etc)

◆ node_id_

unsigned int wolf::NodeBase::node_id_
protected

Node id. It is unique over the whole Wolf Tree.

◆ node_name_

std::string wolf::NodeBase::node_name_
protected

Text label identifying each specific object ("left camera", "LIDAR 1", "PointGrey", "Andrew", etc)

◆ node_type_

std::string wolf::NodeBase::node_type_
protected

Type or subcategory of node (derived class name: "SensorOdom2d", etc)

◆ problem_ptr_

ProblemWPtr wolf::NodeBase::problem_ptr_
protected

Problem the node belongs to.


The documentation for this class was generated from the following files: